<%--
  Created by IntelliJ IDEA.
  User: E.Krasnotschek
  Date: 7/22/13
  Time: 10:43 AM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf8">
    <title>WatchFacts Brand List</title>
</head>
<body>
<h2>WatchFacts Brand List</h2>
<c:if test="${!empty brandList}">
    <table>
        <c:forEach items="${brandList}" var="brand">
            <tr>
                <td>${brand.name}</td>
                <td><a href="delete/${brand.id}">Delete</a></td>
            </tr>
        </c:forEach>
    </table>
</c:if>
<h3>Add new brand</h3>
<form:form action="create" method="post" modelAttribute="brand">
    <form:label path="name">Brand:</form:label>
    <form:input path="name"></form:input>
    <input type="submit" value="Add"/>
</form:form>
</body>
</html>